package api

type ComplyAuthReq struct {
	UserName string `json:"username"`
	PassWord string `json:"password"`
	Realm    string `json:"realm"`
}

type ComplyAuthRes struct {
	AccessToken string `json:"access_token"`
	Scope       string `json:"scope"`
	ExpiresIn   int64  `json:"expires_in"`
	TokenType   string `json:"token_type"`
}

type ComplyCompanyOnboardingReq struct {
	Customer      Customer      `json:"customer"`
	Product       []ProductList `json:"product"`
	Configuration struct {
		MonitorConfigurationIdentifier   string `json:"monitor_configuration_identifier"`
		ScreeningConfigurationIdentifier string `json:"screening_configuration_identifier"`
	} `json:"configuration"`
	Account     string `json:"account"`
	AccountType string `json:"account_type"`
}

type Customer struct {
	CustomerId         string  `json:"customer_id"`
	Company            Company `json:"company"` //必传
	CustomerIdentifier struct {
		Id string `json:"id"`
	} `json:"customer_identifier"` //必传
	CustomerStatus     string `json:"customer_status"` //必传
	ExternalIdentifier struct {
		Id string `json:"id"`
	} `json:"external_identifier"` //必传
}

type Person struct {
	Title   string `json:"title"`
	Address []struct {
		AddressLine1       string `json:"address_line1"`
		AddressLine2       string `json:"address_line2"`
		AddressType        string `json:"address_type"`
		Country            string `json:"country"`
		CountrySubdivision string `json:"country_subdivision"`
		PostCode           string `json:"post_code"`
		TownName           string `json:"town_name"`
	} `json:"address"`
	DateOfBirth struct {
		Day   int32 `json:"day"`   //必填
		Month int32 `json:"month"` //必填
		Year  int32 `json:"year"`  //必填
	} `json:"date_of_birth"`
	ContactInformation struct {
		EmailAddress []string `json:"email_address"`
		FaxNumber    []string `json:"fax_number"`
		Url          []string `json:"url"`
		PhoneNumber  []string `json:"phone_number"`
	} `json:"contact_information"`
	CountryOfBirth         string   `json:"country_of_birth"`
	FirstName              string   `json:"first_name"`
	Gender                 string   `json:"gender"`
	LastName               string   `json:"last_name"`
	MiddleName             string   `json:"middle_name"`
	Nationality            []string `json:"nationality"`
	PersonalIdentification []struct {
		Type               string `json:"type"`                //必填
		DocumentIdentifier string `json:"document_identifier"` //必填
		IssuingCountry     string `json:"issuing_country"`     //必填
		DateOfIssue        struct {
			Year  int `json:"year"`  //必填
			Month int `json:"month"` //必填
			Day   int `json:"day"`   //必填
		} `json:"date_of_issue"`
		DateOfExpiry struct {
			Year  int `json:"year"`  //必填
			Month int `json:"month"` //必填
			Day   int `json:"day"`   //必填
		} `json:"date_of_expiry"`
	} `json:"personal_identification"`
	Profession             []string `json:"profession"`
	ResidentialInformation []struct {
		CountryOfResidence string `json:"country_of_residence"` //必填
		ResidentialStatus  string `json:"residential_status"`
	} `json:"residential_information"`
	SalaryCurrency string `json:"salary_currency"`
	SalaryRange    struct {
		Low  int `json:"low"`  //必填
		High int `json:"high"` //必填
	} `json:"salary_range"`
	SourceOfWealth string `json:"source_of_wealth"`
}

type Company struct {
	Addresses []struct {
		AddressLine1       string `json:"address_line1"`
		AddressLine2       string `json:"address_line2"`
		AddressType        string `json:"address_type"`
		Country            string `json:"country"`
		CountrySubdivision string `json:"country_subdivision"`
		PostCode           string `json:"post_code"`
		TownName           string `json:"town_name"`
	} `json:"addresses"` //必传
	Aliases           []string `json:"aliases"` //必传
	CompanyStatus     string   `json:"company_status"`
	CompanyType       string   `json:"company_type"`
	IncorporationDate struct {
		Day   int32 `json:"day"`   //必传
		Month int32 `json:"month"` //必传
		Year  int32 `json:"year"`  //必传
	} `json:"incorporation_date"`
	LegalName                           string `json:"legal_name"`
	PlaceOfRegistration                 string `json:"place_of_registration"`
	RegistrationAuthorityIdentification string `json:"registration_authority_identification"`
}

type ProductList struct {
	ProductName              string `json:"product_name"`
	ProductStatus            string `json:"product_status"`
	Currency                 string `json:"currency"`
	MonthlyPaymentValue      string `json:"monthly_payment_value"`
	MonthlyReceivedValue     string `json:"monthly_received_value"`
	MonthlyTransactionNumber string `json:"monthly_transaction_number"`
	Purpose                  string `json:"purpose"`
	ProductDetails           struct {
		BankAccount struct {
			AccountNumber string `json:"account_number"`
			SortCode      string `json:"sort_code"`
			Iban          string `json:"iban"`
			Bban          string `json:"bban"`
			Bank          struct {
				Bic string `json:"bic"`
			} `json:"bank"`
		} `json:"bank_account"`
		CryptoWallet struct {
			ManagingExchange string `json:"managing_exchange"`
			WalletId         string `json:"wallet_id"`
		} `json:"crypto_wallet"`
	} `json:"product_details"`
	OnboardingChannel struct {
		Online struct {
			IpAddress  string `json:"ip_address"`
			IpFormat   string `json:"ip_format"`
			DeviceId   string `json:"device_id"`
			DeviceType string `json:"device_type"`
		} `json:"online"`
		InBranch struct {
			BranchIdentifier string `json:"branch_identifier"`
		} `json:"in_branch"`
	} `json:"onboarding_channel"`
}

type ComplyOnboardingRes struct {
	WorkflowInstanceIdentifier string `json:"workflow_instance_identifier"`
}

type CustomerMessageRes struct {
	CustomerId      string `json:"customer_id"`
	CustomerStatus  string `json:"customer_status"`
	OverallLevel    string `json:"overall_level"`
	OverallValue    string `json:"overall_value"`
	ScreeningResult string `json:"screening_result"`
}

type CustomerTempReq struct {
	Account     string `json:"account"`
	ReqJson     string `json:"req_json"`
	CustomerId  string `json:"customer_id"`
	AccountType string `json:"account_type"`
}

type CustomerTempRes struct {
	Account    string `json:"account"`
	ReqJson    string `json:"req_json"`
	CustomerId string `json:"customer_id"`
}

type WorkflowResultRes struct {
	ApiVersion                 string   `json:"api_version"`
	WorkflowInstanceIdentifier string   `json:"workflow_instance_identifier"`
	WorkflowType               string   `json:"workflow_type"`
	Steps                      []string `json:"steps"`
	Status                     string   `json:"status"`
	StepDetails                struct {
		CustomerCreation struct {
			Status     string `json:"status"`
			Identifier string `json:"identifier"`
			StepOutput struct {
				CustomerIdentifier string `json:"customer_identifier"`
			} `json:"step_output"`
		} `json:"customer-creation"`
		InitialRiskScoring struct {
			Status     string `json:"status"`
			Identifier string `json:"identifier"`
			StepOutput struct {
				OverallValue int    `json:"overall_value"`
				OverallLevel string `json:"overall_level"`
			} `json:"step_output"`
		} `json:"initial-risk-scoring"`
		CustomerScreening struct {
			Status     string `json:"status"`
			Identifier string `json:"identifier"`
			StepOutput struct {
				ScreeningResult string `json:"screening_result"`
			} `json:"step_output"`
		} `json:"customer-screening"`
		Alerting struct {
			Status     string      `json:"status"`
			Identifier interface{} `json:"identifier"`
			StepOutput struct {
				Alerts []struct {
					Identifier string `json:"identifier"`
				} `json:"alerts"`
			} `json:"step_output"`
		} `json:"alerting"`
		CaseCreation struct {
			Status     string `json:"status"`
			Identifier string `json:"identifier"`
			StepOutput struct {
				CaseIdentifier string `json:"case_identifier"`
			} `json:"step_output"`
		} `json:"case-creation"`
	} `json:"step_details"`
}

type DoApprovalReq struct {
	Account    string `json:"account"`
	CustomerId string `json:"customer_id"`
	Message    string `json:"message"`
}

type PaymentRes struct {
	Code string `json:"code"`
	Desc string `json:"desc"`
}

type PersonReq struct {
	Name       string `json:"name"`
	Email      string `json:"email"`
	Country    string `json:"country"`
	StartTime  string `json:"start_time"`
	EndTime    string `json:"end_time"`
	PageSize   uint64 `json:"page_size"`
	PageNo     uint64 `json:"page_no"`
	SortFields string `json:"sort_fields"`
	SortMethod string `json:"sort_method"`
}

type PersonRes struct {
	CustomerId       string `json:"customer_id"`
	Country          string `json:"country"`
	Email            string `json:"email"`
	FirstName        string `json:"first_name"`
	MiddleName       string `json:"middle_name"`
	LastName         string `json:"last_name"`
	Balance          string `json:"balance"`
	TransactionCount string `json:"transaction_count"`
	CreatedAt        string `json:"created_at"`
	CustomerStatus   string `json:"customer_status"`
	OverallLevel     string `json:"overall_level"`
	OverallValue     string `json:"overall_value"`
	Message          string `json:"message"`
	Account          string `json:"account"`
	AccountType      string `json:"account_type"`
}

type CompanyReq struct {
	Name       string `json:"name"`
	Email      string `json:"email"`
	StartTime  string `json:"start_time"`
	EndTime    string `json:"end_time"`
	PageSize   uint64 `json:"page_size"`
	PageNo     uint64 `json:"page_no"`
	SortFields string `json:"sort_fields"`
	SortMethod string `json:"sort_method"`
}

type CompanyRes struct {
	CustomerId       string `json:"customer_id"`
	Country          string `json:"country"`
	Email            string `json:"email"`
	LegalName        string `json:"legalName"`
	Balance          string `json:"balance"`
	TransactionCount string `json:"transaction_count"`
	CreatedAt        string `json:"created_at"`
	CustomerStatus   string `json:"customer_status"`
	OverallLevel     string `json:"overall_level"`
	OverallValue     string `json:"overall_value"`
	Message          string `json:"message"`
	Account          string `json:"account"`
	AccountType      string `json:"account_type"`
}

type CompanyTypeRes struct {
	Code string `json:"code"`
	Desc string `json:"desc"`
}

type BusinessTypeRes struct {
	Code string `json:"code"`
	Desc string `json:"desc"`
}

type IncomeSourceRes struct {
	Code string `json:"code"`
	Desc string `json:"desc"`
}
